package com.lrm.web;

import com.lrm.biz.IBlogBiz;
import com.lrm.pojo.Blog;
import com.lrm.util.Result;
import com.lrm.util.ResultUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @Author: 王金海
 * @Description:
 * @Date: Created by Administrator on 2017/12/7.
 * @Modified By: 分类统计
 *     **********************************
 *                  2017
 *       博客1
 *       博客2
 *       博客3
 *                  2016
 *       博客1
 *       博客2
 *       博客3
 *     **********************************
 */
@RestController
@RequestMapping("archiveShow")
public class ArchiveShowController {

    @Autowired
    private IBlogBiz blogBiz;

    @GetMapping("archives")
    public Result archives(){
        Map<String, List<Blog>> map = blogBiz.archiveBlog();
        return ResultUtil.success(map);
    }
}
